home *** CD-ROM | disk | FTP | other *** search
Wrap
Oberon Document | 1994-06-07 | 3.2 KB | 76 lines | [ oODC/obnF]
Documents.StdDocumentDesc Documents.DocumentDesc Containers.ViewDesc Views.ViewDesc Stores.StoreDesc Documents.ModelDesc Containers.ModelDesc Models.ModelDesc Stores.ElemDesc TextViews.StdViewDesc TextViews.ViewDesc TextModels.StdModelDesc TextModels.ModelDesc TextModels.AttributesDesc Geneva Geneva Geneva L Frutiger Light Geneva MODULE SamplesEx6; IMPORT Files, Views, Dialog, TextModels, TextMappers, TextViews; adr*: RECORD (Dialog.Interactor) name*: ARRAY 64 OF CHAR; street*: ARRAY 64 OF CHAR; city*: ARRAY 24 OF CHAR; state*: ARRAY 6 OF CHAR; ZIP*: ARRAY 6 OF CHAR; country*: ARRAY 16 OF CHAR; customer: LONGINT; update*: BOOLEAN; Text*: PROCEDURE END; PROCEDURE Text; VAR stationary: BOOLEAN; loc: Files.Locator; name: Files.Name; v: Views.View; t: TextModels.Model; f: TextMappers.Formatter; BEGIN Dialog.GetIntSpec("", stationary, loc, name); IF loc # NIL THEN v := Views.OldView(loc, name); IF v IS TextViews.View THEN t := v(TextViews.View).ThisModel(); f.ConnectTo(t); f.SetPos(t.Length()); f.WriteString(adr.name); f.WriteTab; f.WriteString(adr.street); f.WriteTab; f.WriteString(adr.city); f.WriteTab; f.WriteString(adr.state); f.WriteTab; f.WriteString(adr.ZIP); f.WriteTab; f.WriteString(adr.country); f.WriteTab; f.WriteInt(adr.customer); f.WriteTab; f.WriteBool(adr.update); f.WriteLn; Views.Open(v, NIL, ""); adr.name := ""; adr.street := ""; adr.city := ""; adr.state := ""; adr.ZIP := ""; adr.country := ""; adr.customer := 0; adr.update := FALSE; adr.Notify END END END Text; BEGIN adr.Text := Text END SamplesEx6. TextControllers.StdCtrlDesc TextControllers.ControllerDesc Containers.ControllerDesc Controllers.ControllerDesc TextRulers.StdRulerDesc TextRulers.RulerDesc TextRulers.StdStyleDesc TextRulers.StyleDesc TextRulers.AttributesDesc Geneva Example 6 This example combines features of earlier examples: it allows to enter an address via a mask, and a push button causes the entered data to be appended to a text in a file. Afterwards, the entered data is cleared again. In order to be able to notify controls of a change in the displayed data, the interactor must be an extension of a Dialog.Interactor. Such an interactor has a Notify procedure, for exactly this purpose. Geneva Documents.ControllerDesc